﻿using mei_cs.communication;

namespace mei_cs;

internal static class Program
{
    public static async Task Main()
    {
        using (var asyncClient = new AsyncClient("debug"))
        {
            for (var i = 0; i < 3; i++)
            {
                Console.WriteLine("DEBUG: " + await asyncClient.Send(i.ToString()));
            }
        }

        var client = Client.GetClient();
        new Thread(client.Listen).Start();

        while (true)
        {
            var s = Console.ReadLine();
            if (string.IsNullOrEmpty(s)) break;
            Console.WriteLine(client.Send("debug", s));
        }

        client.Close();
    }
}